package com.lyk.coursearrange.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyk.coursearrange.entity.SourcePeople;
import com.lyk.coursearrange.entity.Stages;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SourcePeopleDao extends BaseMapper<SourcePeople> {
    @Select("SELECT sourcepeople_name  FROM  `tb_sourcepeople` WHERE sourcepeople_id = #{customerSourcepeople}")
    String getsourcepeoplename(@Param("customerSourcepeople") Long customerSourcepeople);
    @Select("SELECT sourcepeople_id  FROM  `tb_sourcepeople` WHERE sourcepeople_name = #{realname}")
    Long getsourcepeopleid(@Param("realname") String realname);


    boolean insertstages(@Param("s") Stages stages);

    boolean insertcustomerasstages(@Param("customer_id") Long customerId,@Param("stages_id") Long stagesId);

    List    <Stages> selectstages(@Param("customer_id") Long customer_id);

    void deletebycustomeridtwo(@Param("customerId") Long customerId);

    void deletebycustomeridone(@Param("customerId")Long customerId);
}
